# -*- coding: utf-8 -*-
# @Time    : 2021/8/29 23:00
# @Author  : BrandonGT
# @FileName: code_04_widgetbynumber.py

from PyQt5.QtWidgets import *
import sys

app = QApplication(sys.argv)

sector_number = 100
window = QWidget()

# sec_01 = QPushButton(window)
# sec_01.setFixedSize(200, 100)
# sec_01.setText("Section 01")

for i in range(sector_number):
    row = i%3
    colum = int(i/3)
    secs = QPushButton(window)
    secs.setFixedSize(200, 100)
    secs.setText("Section %s" % i)

    secs.move(int(row*200), int(colum*100))


window.show()

sys.exit(app.exec_())